package thinking.函数高级

import scala.annotation.tailrec

object 递归 {
  def main(args: Array[String]): Unit = {

  }

  @tailrec
  def mx(num: BigInt, sum: BigInt): BigInt = {
    if (num < 999999L) mx(num + 1, sum + num)
    else sum
  }

}
